package com.shanzmoo.db.sys.mapper;

import com.shanzmoo.db.sys.entity.RoleEntity;
import com.shanzmoo.db.sys.entity.UserRoleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户角色关系表 Mapper 接口
 * </p>
 *
 * @author Gzhao
 * @since 2020-11-10
 */
public interface UserRoleMapper extends BaseMapper<UserRoleEntity> {

    List<RoleEntity> getUserRoles(@Param("userId") Integer userId);

    void insertBacth(@Param("list") List<UserRoleEntity> list);

    void deleteByUserId(@Param("userId") Integer userId);
}
